import {request} from "@@/plugin-request/request";
import {SummaryDayStockIn, SummaryDayStockInData} from "@/services/report/typings";

export async function getSummaryDayStockIn(
  params: { endDate: string, deltaTime: number },
  options?: { [key: string]: any },
) {
  return request<BaseResponse<SummaryDayStockIn[]>>('/api/report/summary/day/stock-in', {
    method: 'GET',
    params: params,
    ...(options || {}),
  });
}

export async function getSummaryDayStockInData(
  params: { endDate: string},
  options?: { [key: string]: any },
) {
  return request<BaseResponse<SummaryDayStockInData>>('/api/report/summary/day/stock-in-data', {
    method: 'GET',
    params: params,
    ...(options || {}),
  });
}

export async function getSummaryDayStockOut(
  params: { endDate: string, deltaTime: number },
  options?: { [key: string]: any },
) {
  return request<BaseResponse<SummaryDayStockIn[]>>('/api/report/summary/day/stock-out', {
    method: 'GET',
    params: params,
    ...(options || {}),
  });
}

export async function getSummaryDayStockOutData(
  params: { endDate: string},
  options?: { [key: string]: any },
) {
  return request<BaseResponse<SummaryDayStockInData>>('/api/report/summary/day/stock-out-data', {
    method: 'GET',
    params: params,
    ...(options || {}),
  });
}
